package com.fulihui.weixinclient.request.order;

import com.fulihui.weixinclient.http.HttpMethodEnum;
import com.fulihui.weixinclient.result.order.CloseOrderWeixinResult;
import com.fulihui.weixinclient.util.XMLUtil;

/**
 * 关闭微信订单接口请求参数
 * Created by Willard on 2015/9/17.
 */
public class CloseOrderWeixinRequest extends OrderWeixinRequest<CloseOrderWeixinResult> {
    private static final long serialVersionUID = -8431481277394213312L;

    /* 商户订单号 Required */
    private String            out_trade_no;

    @Override
    protected void childParam() {
    }

    @Override
    public String service() {
        return "https://api.mch.weixin.qq.com/pay/closeorder";
    }

    @Override
    public String urlEndStr() {
        return null;
    }

    @Override
    public CloseOrderWeixinResult parseResult(String respStr) {
        return XMLUtil.parseObject(respStr, CloseOrderWeixinResult.class);
    }

    @Override
    public HttpMethodEnum httpMethod() {
        return HttpMethodEnum.SSL_POST;
    }

    @Override
    public String requestData() {
        return XMLUtil.toXMLString(this);
    }

    public String getOut_trade_no() {
        return out_trade_no;
    }

    public void setOut_trade_no(String out_trade_no) {
        this.out_trade_no = out_trade_no;
    }
}
